Packing Alpha Anywhere Tables

Description

After editing or deleting records and layouts, it is a good idea to pack and backup the tables in your database. When the database is remotely located on a Application Server, you need to create a page with the following code.

  1. Create a dialog component with an Advanced Button control.

  2. Put this code in the button's Server > Event field.

    dim tbl as P
    dim fl as C
    fl = filefind.get("[PathAlias.adb_path]\*.dbf", FILE_FIND_NORMAL, "PN")
    for each fn in fl 
     on error goto skip 
     tbl = table.open(fn,file_rw_exclusive) 
     tbl.pack() 
     tbl.update_production_index() 
     tbl.close() 
     skip: 
     next
  3. Place the dialog component on a page.

  4. Run the page and click the button to pack your database's tables.